<template>
  <div id='wrap'>
    <h1>路由页面跳转</h1>
    <!-- <RouterLink to="/Scu51">跳转到购物车案例</RouterLink> -->
    <!-- <RouterLink :to="{path:'/Scu51'}">跳转到购物车案例</RouterLink> -->
     <RouterLink :to="obj" replace>跳转到购物车案例</RouterLink>
    <!-- <RouterLink :to="{name:'scu51'}">跳转到购物车案例</RouterLink> -->
    <button  @click="toscu50">跳转页面</button>
  </div>
</template>

<script lang='ts'>
export default {
  name: 'scu29',
}
</script>

<script lang='ts' setup>
import router from '@/router';
const toscu50=()=>{
    router.replace('/Scu50')
}
const obj={path:'/scu51'}
</script>

<style scoped lang='scss'>

</style>